3.1.98 \(\int (c+d x) (a+i a \sinh (e+f x)) \, dx\) [98]

Optimal. Leaf size=50 \[ \frac {a (c+d x)^2}{2 d}+\frac {i a (c+d x) \cosh (e+f x)}{f}-\frac {i a d \sinh (e+f x)}{f^2} \]

[Out]

1/2*a*(d*x+c)^2/d+I*a*(d*x+c)*cosh(f*x+e)/f-I*a*d*sinh(f*x+e)/f^2

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3398, 3377, 2717} \begin {gather*} \frac {i a (c+d x) \cosh (e+f x)}{f}+\frac {a (c+d x)^2}{2 d}-\frac {i a d \sinh (e+f x)}{f^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*(a + I*a*Sinh[e + f*x]),x]

[Out]

(a*(c + d*x)^2)/(2*d) + (I*a*(c + d*x)*Cosh[e + f*x])/f - (I*a*d*Sinh[e + f*x])/f^2

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3398

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] ||
IGtQ[m, 0] || NeQ[a^2 - b^2, 0])

Rubi steps

\begin {align*} \int (c+d x) (a+i a \sinh (e+f x)) \, dx &=\int (a (c+d x)+i a (c+d x) \sinh (e+f x)) \, dx\\ &=\frac {a (c+d x)^2}{2 d}+(i a) \int (c+d x) \sinh (e+f x) \, dx\\ &=\frac {a (c+d x)^2}{2 d}+\frac {i a (c+d x) \cosh (e+f x)}{f}-\frac {(i a d) \int \cosh (e+f x) \, dx}{f}\\ &=\frac {a (c+d x)^2}{2 d}+\frac {i a (c+d x) \cosh (e+f x)}{f}-\frac {i a d \sinh (e+f x)}{f^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 48, normalized size = 0.96 \begin {gather*} \frac {a \left (f^2 x (2 c+d x)+2 i f (c+d x) \cosh (e+f x)-2 i d \sinh (e+f x)\right )}{2 f^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*(a + I*a*Sinh[e + f*x]),x]

[Out]

(a*(f^2*x*(2*c + d*x) + (2*I)*f*(c + d*x)*Cosh[e + f*x] - (2*I)*d*Sinh[e + f*x]))/(2*f^2)

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 95 vs. \(2 (46 ) = 92\).
time = 0.38, size = 96, normalized size = 1.92

method result size
risch \(\frac {a d \,x^{2}}{2}+a c x +\frac {i a \left (d x f +c f -d \right ) {\mathrm e}^{f x +e}}{2 f^{2}}+\frac {i a \left (d x f +c f +d \right ) {\mathrm e}^{-f x -e}}{2 f^{2}}\) \(62\)
derivativedivides \(\frac {\frac {d a \left (f x +e \right )^{2}}{2 f}+\frac {i d a \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}-\frac {d e a \left (f x +e \right )}{f}-\frac {i d e a \cosh \left (f x +e \right )}{f}+a c \left (f x +e \right )+i a c \cosh \left (f x +e \right )}{f}\) \(96\)
default \(\frac {\frac {d a \left (f x +e \right )^{2}}{2 f}+\frac {i d a \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}-\frac {d e a \left (f x +e \right )}{f}-\frac {i d e a \cosh \left (f x +e \right )}{f}+a c \left (f x +e \right )+i a c \cosh \left (f x +e \right )}{f}\) \(96\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*(a+I*a*sinh(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

1/f*(1/2*d/f*a*(f*x+e)^2+I*d/f*a*((f*x+e)*cosh(f*x+e)-sinh(f*x+e))-d/f*e*a*(f*x+e)-I*d/f*e*a*cosh(f*x+e)+a*c*(
f*x+e)+I*a*c*cosh(f*x+e))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 70, normalized size = 1.40 \begin {gather*} \frac {1}{2} \, a d x^{2} + a c x + \frac {1}{2} i \, a d {\left (\frac {{\left (f x e^{e} - e^{e}\right )} e^{\left (f x\right )}}{f^{2}} + \frac {{\left (f x + 1\right )} e^{\left (-f x - e\right )}}{f^{2}}\right )} + \frac {i \, a c \cosh \left (f x + e\right )}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+I*a*sinh(f*x+e)),x, algorithm="maxima")

[Out]

1/2*a*d*x^2 + a*c*x + 1/2*I*a*d*((f*x*e^e - e^e)*e^(f*x)/f^2 + (f*x + 1)*e^(-f*x - e)/f^2) + I*a*c*cosh(f*x +
e)/f

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 84, normalized size = 1.68 \begin {gather*} \frac {{\left (i \, a d f x + i \, a c f + i \, a d + {\left (i \, a d f x + i \, a c f - i \, a d\right )} e^{\left (2 \, f x + 2 \, e\right )} + {\left (a d f^{2} x^{2} + 2 \, a c f^{2} x\right )} e^{\left (f x + e\right )}\right )} e^{\left (-f x - e\right )}}{2 \, f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+I*a*sinh(f*x+e)),x, algorithm="fricas")

[Out]

1/2*(I*a*d*f*x + I*a*c*f + I*a*d + (I*a*d*f*x + I*a*c*f - I*a*d)*e^(2*f*x + 2*e) + (a*d*f^2*x^2 + 2*a*c*f^2*x)
*e^(f*x + e))*e^(-f*x - e)/f^2

________________________________________________________________________________________

Sympy [A]
time = 0.20, size = 162, normalized size = 3.24 \begin {gather*} a c x + \frac {a d x^{2}}{2} + \begin {cases} \frac {\left (\left (2 i a c f^{3} + 2 i a d f^{3} x + 2 i a d f^{2}\right ) e^{- f x} + \left (2 i a c f^{3} e^{2 e} + 2 i a d f^{3} x e^{2 e} - 2 i a d f^{2} e^{2 e}\right ) e^{f x}\right ) e^{- e}}{4 f^{4}} & \text {for}\: f^{4} e^{e} \neq 0 \\\frac {x^{2} \left (i a d e^{2 e} - i a d\right ) e^{- e}}{4} + \frac {x \left (i a c e^{2 e} - i a c\right ) e^{- e}}{2} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+I*a*sinh(f*x+e)),x)

[Out]

a*c*x + a*d*x**2/2 + Piecewise((((2*I*a*c*f**3 + 2*I*a*d*f**3*x + 2*I*a*d*f**2)*exp(-f*x) + (2*I*a*c*f**3*exp(
2*e) + 2*I*a*d*f**3*x*exp(2*e) - 2*I*a*d*f**2*exp(2*e))*exp(f*x))*exp(-e)/(4*f**4), Ne(f**4*exp(e), 0)), (x**2
*(I*a*d*exp(2*e) - I*a*d)*exp(-e)/4 + x*(I*a*c*exp(2*e) - I*a*c)*exp(-e)/2, True))

________________________________________________________________________________________

Giac [A]
time = 0.43, size = 69, normalized size = 1.38 \begin {gather*} \frac {1}{2} \, a d x^{2} + a c x - \frac {{\left (-i \, a d f x - i \, a c f + i \, a d\right )} e^{\left (f x + e\right )}}{2 \, f^{2}} - \frac {{\left (-i \, a d f x - i \, a c f - i \, a d\right )} e^{\left (-f x - e\right )}}{2 \, f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+I*a*sinh(f*x+e)),x, algorithm="giac")

[Out]

1/2*a*d*x^2 + a*c*x - 1/2*(-I*a*d*f*x - I*a*c*f + I*a*d)*e^(f*x + e)/f^2 - 1/2*(-I*a*d*f*x - I*a*c*f - I*a*d)*
e^(-f*x - e)/f^2

________________________________________________________________________________________

Mupad [B]
time = 0.12, size = 56, normalized size = 1.12 \begin {gather*} \frac {\frac {a\,f\,\left (c\,\mathrm {cosh}\left (e+f\,x\right )\,2{}\mathrm {i}+d\,x\,\mathrm {cosh}\left (e+f\,x\right )\,2{}\mathrm {i}\right )}{2}-a\,d\,\mathrm {sinh}\left (e+f\,x\right )\,1{}\mathrm {i}}{f^2}+\frac {a\,\left (d\,x^2+2\,c\,x\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*sinh(e + f*x)*1i)*(c + d*x),x)

[Out]

((a*f*(c*cosh(e + f*x)*2i + d*x*cosh(e + f*x)*2i))/2 - a*d*sinh(e + f*x)*1i)/f^2 + (a*(2*c*x + d*x^2))/2

________________________________________________________________________________________